package com.ece.demo.controller.commands.sprite;

import dev.ece.core.engine.Engine;
import dev.ece.suit.heightmap.HeightMapModel;
import dev.ece.suit.loader.Sprite3D;
import dev.ece.util.lib.Vector3f;
import dev.ece.util.lib.Vector4f;
import dev.ece.util.tools.Camera;

/**
 * @author 潜行的青衣
 * @see
 */
public class SpriteMoveBackCommand extends SpriteMoveCommand {

	/**
	 * @param heightModel
	 * @param sprite
	 * @param camera
	 * @param position
	 * @param rotation
	 * @param speed
	 */
	public SpriteMoveBackCommand(HeightMapModel heightModel, Sprite3D<Float> sprite, Camera camera, Vector3f position,
			Vector4f rotation, float speed) {
		super(heightModel, sprite, camera, position, rotation, speed);
	}

	/* (non-Javadoc)
	 * @see com.ece.demo.controller.commands.sprite.SpriteMoveCommand#getDirVector()
	 */
	@Override
	public Vector3f getDirVector() {
		float distance = Engine.currentTimer().getDalyTime() * this.getSpeed();
		this.getRotation().setW(180);
		return new Vector3f(0, 0, distance);
	}

}
